package com.ojoin.trade.t0loan_core.web.dao;

import java.util.List;

import org.apache.ibatis.session.SqlSession;
import org.springframework.data.domain.Pageable;

import com.ojoin.trade.common.exception.BusinessException;
import com.ojoin.trade.common.web.dao.BaseDao;
import com.ojoin.trade.t0loan_core.web.domain.T0LoanTransTotalInfoVO;
import com.ojoin.trade.t0loan_core.web.domain.TxLoanTransTotalInfoVO;
import com.ojoin.trade.t0loan_core.web.domain.TbOutofSinglePosTranscationLog;
import com.ojoin.trade.t0loan_core.web.domain.TbT0LoanFinalApplication;

public interface TbT0LoanFinalApplicationDao extends BaseDao<TbT0LoanFinalApplication> {

	public SqlSession getSqlSession();
	
	public List<TbT0LoanFinalApplication> queryTxLoanFinalInfoByJoinUserID(
			int joinuserid) throws BusinessException;
	
	public List<TbT0LoanFinalApplication> queryTxLoanFinalInfoByJoinUserIDAndType(
			int joinuserid, String operatetype) throws BusinessException;
	
	/**
	 * 正常商户列表--查询所有已申请成功T+0贷款的可放贷九盈用户交易金额合计列表记录-(T0000009)
	 * 
	 * @return
	 * @throws BusinessException
	 */
	public List<T0LoanTransTotalInfoVO> queryAllT0LoanJoinUserTransanctionTotalList(String shortDate, String shortTime, Pageable page) throws BusinessException;

	
	/**
	 * 正常商户列表--查询所有已申请成功Tx贷款的可放贷九盈用户交易金额合计列表记录
	 * 
	 * @return
	 * @throws BusinessException
	 */
	public List<TxLoanTransTotalInfoVO> queryAllTxLoanJoinUserTransanctionTotalList(Pageable page, String operatetype) throws BusinessException;

	/**
	 * 日额度超限商户列表 (T0000009)
	 * 
	 * @return
	 * @throws BusinessException
	 */
	public List<T0LoanTransTotalInfoVO> queryAllOutOfDayJoinUserTransanctionTotalList(String shortDate, String shortTime, Pageable page) throws BusinessException;

	/**
	 * 单笔额度超限商户列表 (T0000009)
	 * 
	 * @return
	 * @throws BusinessException
	 */
	public List<T0LoanTransTotalInfoVO> queryAllOutofSingleJoinUserTransanctionTotalList(String shortDate, String shortTime, Pageable page) throws BusinessException;

	/**
	 * 商户单笔额度超限交易列表
	 * 
	 * @return
	 * @throws BusinessException
	 */
	public List<TbOutofSinglePosTranscationLog> queryOutofSinglePosTranscationLogListByMhtno(String mhtno, String shortDate, String shortTime, Pageable page) throws BusinessException;

}
